﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace Speedy
{
    public class dbListe
    {
        string Satici = System.Configuration.ConfigurationSettings.AppSettings["CariKodu"];
        static string SSatici = System.Configuration.ConfigurationSettings.AppSettings["CariKodu"];
        ISynchronizer sqlinstance;
        public dbListe()
        {
            string defaultval = "";
            if (Config.GetConfig.GetValue(CParams.Db).IndexOf("Mikro") > -1)
                defaultval = "Mikro V12";
            else
                defaultval = "WorkGroup";

            if (Config.GetConfig.GetValue(CParams.ProgramType, defaultval) == "WorkGroup")
                sqlinstance = new syncWorkGrup();
            else
                sqlinstance = new syncMikroV12();
        }
        public DataTable LoadData(ListeTipleri tip, string filtre)
        {
            return sqlinstance.ListeLoadData(tip, filtre);
        }
    }
}
